package com.jc.base;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ErrMsgManager {
	
	private static final Properties MSG_CONFIG = new Properties();
	
	static{
		init();
	}
	
	public static String getErrMsg(String errCode){		
		return MSG_CONFIG.getProperty(errCode);		
	}
	
	
	private static void init(){
		InputStream in = ErrMsgManager.class.getClassLoader().getResourceAsStream("err_code");
		if( in != null ){
			try {
				MSG_CONFIG.load(in);
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
	}

}
